<template>
  <div>
    <div>sad</div>
    <h3>{{ counter }}</h3>
    <button @click="counter.$patch({ count: counter.count + 1 })">as</button>
  </div>
</template>

<script>
import { useCounterStore, useCounterMainStore } from "../../pinia/index";

export default {
  setup() {
    const counter = useCounterStore();
    counter.count++;
    // with autocompletion ✨
    counter.$patch({ count: counter.count + 1 });
    // or using an action instead
    counter.increment();
    return { counter, red: "red" };
  },
};
</script>

<style>
button {
  color: v-bind(red);
}
</style>
